﻿@model DepartmentModel
@{
    ViewBag.Title = "新增/编辑组织架构";
    Layout = "~/Views/Shared/_Layout.cshtml";
    DepartmentModel Department = ViewData["Department"] as DepartmentModel;
}
@section header{
  <script src="/Scripts/Department/add.js" type="text/javascript"></script>
}
<form method="post" action="/Department/save">
  @Html.HiddenFor(x => x.DepartmentID, new { @id = "departmentID", @name = "departmentID" })
    @Html.HiddenFor(x => x.ParentID, new { @id = "ParentID", @name = "ParentID" })
    @Html.HiddenFor(x => x.Level, new { @id = "level", @name = "level" })
    @Html.HiddenFor(x => x.CreateTime)
    @Html.HiddenFor(x => x.IsClosed)

	<table class="tb-form">
        <tr>
            <td class="tb-f-lable">
                <span class="org">*</span>选择上级部门：
            </td>
            <td>
                <input type="button" id="selPartmentID" name="selPartmentID" class="i-btn3" value="选择上级部门"
                    onclick="selDepartment();" />
                    <span id="departmentName">@ViewData["ParentName"]</span>
            </td>
        </tr>   
        <tr>
            <td class="tb-f-lable" style="width: 100px;">
                <span class="org">*</span>部门名称
            </td>
            <td>
              @Html.TextBoxFor(x => x.Name, new { @class = "input-style-d", @maxlength = 50 })
            </td>
        </tr>
        <tr>
            <td class="tb-f-lable">
			排序值
            </td>
            <td>
           @Html.TextBoxFor(x => x.SortOrder, new { @class = "input-style-d", @maxlength = 50 })

            </td>
        </tr>
        <tr>
        <td colspan="2" style="text-align: center;">
            <input type="submit" value="保存" class="i-btn5" />
            <input type="button" onclick="window.top.oDG.cancel();" class="i-btn5" value="取消" />
        </td>
    </tr>
    </table>
    </form>